Data centers are growing densely and providing various services to millions of users through a collection of limited servers. That’s why large-scale data center servers are threatened by the overload phenomenon. In this paper, we propose a framework for data centers that are based on Software-defined networking (SDN) technology and, taking advantage of this technology, seek to balance the load between servers and prevent overloading on a given server. In addition, this framework provides the required services in a fast time and with low computational complexity. The proposed framework is implemented in a real testbed, and a wide variety of experimentations are carried out in comprehensive scenarios to evaluate its performance. Furthermore, the framework is evaluated with four data centers including Three-layer, Fat-Tree, BCube, and Dcell data centers. In the testbed, Open vSwitch v2.4.1 and Floodlight v1.2 are used to implement switches and OpenFlow controllers. The results show that in all four SDN-based architectures, the load balances between the servers is well maintained, and a significant improvement has been made in parameters such as throughput, delay, and resource consumption.